const express = require('./express')

const app = express();

app.use((req, res, next) => {
  console.log('ok')
  next();
})

app.get('/helloworld', (req, res, next) => {

  res.send({ msg: 'helloworld' })
})


app.use((req, res, next) => {
  res.end('404')
})
app.listen(3000, () => {
  console.log(`server had run at http://localhost:3000`);
})